package com.cytech.cloudclinic.http;

import com.cytech.cloudclinic.AccountInfo;
import com.cytech.cloudclinic.BuildConfig;
import com.cytech.cloudclinic.base.BaseBean;
import com.cytech.cloudclinic.bean.Action;
import com.cytech.cloudclinic.bean.Acupoint;
import com.cytech.cloudclinic.bean.AddDrugTag;
import com.cytech.cloudclinic.bean.Drug;
import com.cytech.cloudclinic.bean.DrugTag;
import com.cytech.cloudclinic.bean.Expert;
import com.cytech.cloudclinic.bean.Illness;
import com.cytech.cloudclinic.bean.LoadImageEntity;
import com.cytech.cloudclinic.bean.Patient;
import com.cytech.cloudclinic.bean.PrescriptionTag;
import com.cytech.cloudclinic.bean.RespPrescriptionDrug;
import com.cytech.cloudclinic.bean.UserInfo;
import com.cytech.cloudclinic.bean.resp.RespCaseInfoList;
import com.cytech.cloudclinic.bean.resp.RespCreateBill;
import com.cytech.cloudclinic.bean.resp.RespDrugDetail;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;

/**
 * Description : API
 * 接口的管理类
 *
 * @author fangdingjie
 * @date 2020/5/7
 */


public class API {
    static final String BASE_URL = BuildConfig.BASE_URL;

    public interface WAZApi {
        //登录
        @POST("/login")
        Observable<BaseBean<UserInfo>> login(@Body RequestBody info);
        //修改密码
        @POST("/user/modify/password")
        Observable<BaseBean<UserInfo>> updatePassword(@Body RequestBody info);
        //获取验证码
        @POST("/phone/verify/code")
        Observable<BaseBean<Object>> getMessageCode(@Body RequestBody info);
        //获取用户信息
        @POST("/app/find/user/info")
        Observable<BaseBean<AccountInfo>> getUserInfo();



        //新增患者
        @POST("/app/add/patient")
        Observable<BaseBean<Object>> addPatient(@Body RequestBody info);
        //首页患者列表
        @POST("/app/find/patient/list")
        Observable<BaseBean<List<Patient>>> getPatientList(@Body RequestBody info);
        //患者管理列表
        @POST("/app/find/patient/admin/list")
        Observable<BaseBean<List<Patient>>> getPatientManagerList(@Body RequestBody info);
        //患者详情
        @POST("/app/find/patient/item")
        Observable<BaseBean<Patient>> getPatientDetail(@Body RequestBody info);
        //患者详情病例列表
        @POST("/app/patient/case/list")
        Observable<BaseBean<RespCaseInfoList>> getPatientDetailCase(@Body RequestBody info);

        //药品分类列表
        @POST("/app/find/drug/tag")
        Observable<BaseBean<List<DrugTag>>> getDrugTagList(@Body RequestBody info);
        //药品列表
        @POST("/app/find/drug/list")
        Observable<BaseBean<List<Drug>>> getDrugList(@Body RequestBody info);
        //添加药品
        @POST("/app/add/drug")
        Observable<BaseBean<Object>> addDrug(@Body RequestBody info);
        //获取药品详情
        @POST("/app/find/durg/item")
        Observable<BaseBean<RespDrugDetail>> detailDrug(@Body RequestBody info);

        //专家列表
        @POST("/app/specialist/list")
        Observable<BaseBean<List<Expert>>> getExpertList(@Body RequestBody info);

        //查询药品标签简介
        @POST("/app/find/summary/list")
        Observable<BaseBean<List<AddDrugTag>>> getSummaryList(@Body RequestBody info);
        //添加药品标签简介
        @POST("/app/add/summary")
        Observable<BaseBean<Object>> addSummaryTag(@Body RequestBody info);
        //删除简介
        @POST("/app/delete/summary")
        Observable<BaseBean<Object>> delSummaryTag(@Body RequestBody info);


        //查询疾病列表
        @POST("/app/find/illness")
        Observable<BaseBean<List<Illness>>> getIllnessList(@Body RequestBody info);

        //主诉辅助词列表
        @POST("/app/find/action/list")
        Observable<BaseBean<List<Action>>> getActionList(@Body RequestBody info);
        //添加主诉
        @POST("/app/add/action")
        Observable<BaseBean<Object>> addAction(@Body RequestBody info);


        //穴位列表
        @POST("/app/find/acupoint/list")
        Observable<BaseBean<List<Acupoint>>> getAcuPoint(@Body RequestBody info);

        //处方分类列表
        @POST("/app/prescription/tags")
        Observable<BaseBean<List<PrescriptionTag>>> getPrescriptionTags(@Body RequestBody info);
        //处方模板药品列表
        @POST("/app/prescription/item")
        Observable<BaseBean<RespPrescriptionDrug>> getPrescriptionDrug(@Body RequestBody info);
        //处方模板分类
        @POST("/app/add/prescription_tag")
        Observable<BaseBean<Object>> addPrescriptionCategory(@Body RequestBody info);

        //开方
        @POST("/app/add/prescription")
        Observable<BaseBean<RespCreateBill>> addPrescription(@Body RequestBody info);
        //处方收费
        @POST("/app/prescription/charge")
        Observable<BaseBean<Object>> prescriptionToll(@Body RequestBody info);

        //上传图片
        @POST("/up/image")
        @Multipart
        Observable<BaseBean<LoadImageEntity>> uploadImage(@Part MultipartBody.Part part);


    }

}
